﻿using System;
using System.Collections.Generic;
using System.Text;
using OnlineCourse.Services;
using OnlineCourse.Model.Entity;
using OnlineCourse.Services.Model;
namespace OnlineCourse.Services.IServices
 
{
    public  interface IBuyOrdeServicer
    {
        /// <summary>
        /// 查询所有的订单列表分页
        /// </summary>
        /// <returns></returns>
        List<BuyOrderQueryModel> getBuyOrderQueryList(out int total, int page = 1, int pageSize = 10);
        /// <summary>
        /// 根据用户获取所有的订单记录
        /// </summary>
        /// <param name="UserId"></param>
        /// <returns></returns>
        List<BuyOrderQueryModel> getBuyOrderQueryList(Guid UserId,out int total, int page = 1, int pageSize = 10);

        /// <summary>
        /// 获取一个订单的详细信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        BuyOrderQueryModel getBuyOrder(Guid id);
        /// <summary>
        /// 不用券购买课程
        /// </summary>
        /// <param name="user"></param>
        /// <param name="course"></param>
        /// <returns></returns>
        bool BuyOrderAdd(out int mes,Guid userid, Guid courseid);
        /// <summary>
        /// 用券购买课程
        /// </summary>
        /// <param name="user"></param>
        /// <param name="couponCourse"></param>
        /// <returns></returns>
        bool BuyOrderAdd(out int mes, Guid userid, Guid courseid,Guid couponid);
        List<GroupByTimeBuyOrder> GetGroupByTimeBuyOrders(DateTime date1, DateTime date2);
       
    }
}
